<include file="public@header" />
<style>
    p{
       margin:0;
       padding:0;
    }
    .label{
        display:inline-block;
        margin-bottom:5px;
        padding:5px 10px;
        border-radius:50px;
    }
    .imgtip{
        margin-bottom:5px;
    }
</style>
</head>
<body>
	<div class="wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a >列表</a></li>
		</ul>
        
        <form class="well form-inline margin-top-20" method="post" action="{:url('Orders/index')}">
            技能：
            <select class="form-control" name="skillid" style="width: 100px;">
                <option value=''>全部</option>
                <volist name="skill" id="v">
                    <option value="{$key}" <if condition="input('request.skillid') neq '' && input('request.skillid') eq $key">selected</if>>{$v['name']}</option>
                </volist>
            </select>
            
            状态：
            <select class="form-control" name="status" style="width: 100px;">
                <option value=''>全部</option>
                <volist name="status" id="v">
                    <option value="{$key}" <if condition="input('request.status') neq '' && input('request.status') eq $key">selected</if>>{$v}</option>
                </volist>
            </select>
            提交时间：
            <input class="form-control js-bootstrap-date" name="start_time" id="start_time" value="{:input('request.start_time')}" aria-invalid="false" style="width: 110px;"> - 
            <input class="form-control js-bootstrap-date" name="end_time" id="end_time" value="{:input('request.end_time')}" aria-invalid="false" style="width: 110px;">
            用户ID：
            <input class="form-control" type="text" name="uid" style="width: 200px;" value="{:input('request.uid')}" placeholder="用户ID">
            
            主播ID：
            <input class="form-control" type="text" name="liveuid" style="width: 200px;" value="{:input('request.liveuid')}" placeholder="主播ID">
            订单号：
            <input class="form-control" type="text" name="orderno" style="width: 200px;" value="{:input('request.orderno')}" placeholder="订单号">
			<input type="submit" class="btn btn-primary" value="搜索"/>
            <a class="btn btn-danger" href="{:url('Orders/index')}">清空</a>
        </form>
    
		<form method="post" class="js-ajax-form">
			<table class="table table-hover table-bordered">
				<thead>
					<tr>
						<th>ID</th>
						<th>用户</th>
						<th>主播</th>
						<th>技能</th>
						<th>服务时间</th>
						<th>服务结束时间</th>
						<th>订单号</th>
						<th>数量</th>
						<th>总价</th>
						<th>备注</th>
						<th>支付方式</th>
						<th>状态</th>
						<th>时间</th>
					</tr>
				</thead>
				<tbody>
					<foreach name="list" item="vo">
					<tr>
						<td>{$vo['id']}</td>
						<td>{$vo['userinfo']['user_nickname']} ( {$vo['uid']} )</td>
						<td>{$vo['liveinfo']['user_nickname']} ( {$vo['liveuid']} )</td>
                        <td>{$vo['skill']['name']}</td>
						<td>{$vo['svctm']}</td>
						<td>{$vo['overtime']}</td>
						<td>{$vo['orderno']}</td>
						<td>{$vo['nums']}*{$vo['skill']['method']}</td>
						<td>{$vo['total']}</td>
						<td>{$vo['des']}</td>
						<td>{$paytype[$vo['type']]}</td>
						<td>{$status[$vo['status']]}</td>
                        <td>
                            提交时间:{:date('Y-m-d H:i',$vo['addtime'])}<br>
                            <if condition="$vo['paytime'] neq 0">
                            付款时间:{:date('Y-m-d H:i',$vo['paytime'])}<br>
                            </if>
                            <if condition="$vo['status'] eq 2 || $vo['status'] eq -2">
                            接单时间:{:date('Y-m-d H:i',$vo['receipttime'])}<br>
                            </if>
                            <if condition="$vo['status'] eq -3">
                            拒接时间:{:date('Y-m-d H:i',$vo['receipttime'])}<br>
                            </if>
                            <if condition="$vo['status'] eq -2">
                            完成时间:{:date('Y-m-d H:i',$vo['oktime'])}<br>
                            </if>
                            <if condition="$vo['status'] eq -1">
                            取消时间:{:date('Y-m-d H:i',$vo['canceltime'])}<br>
                            原因:{$vo['reason']}
                            </if>
                        </td>


					</tr>
					</foreach>
				</tbody>
			</table>
			<div class="pagination">{$page}</div>

		</form>
	</div>
	<script src="__STATIC__/js/admin.js"></script>

</body>
</html>